import 'package:kkhousekeep/generated/json/base/json_field.dart';
import 'package:kkhousekeep/generated/json/home_community_detail_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class HomeCommunityDetailEntity {
	late int code;
	late HomeCommunityDetailObj obj;
	late String msg;

	HomeCommunityDetailEntity();

	factory HomeCommunityDetailEntity.fromJson(Map<String, dynamic> json) => $HomeCommunityDetailEntityFromJson(json);

	Map<String, dynamic> toJson() => $HomeCommunityDetailEntityToJson(this);

	HomeCommunityDetailEntity copyWith({int? code, HomeCommunityDetailObj? obj, String? msg}) {
		return HomeCommunityDetailEntity()
			..code= code ?? this.code
			..obj= obj ?? this.obj
			..msg= msg ?? this.msg;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class HomeCommunityDetailObj {
	late int id;
	late String title;
	late String contacts;
	late String contactWay;
	late List<String> showImages;
	late String describe;
	late int views;
	late String publishTime;
	late String createTime;
	late String updateTime;
	late int cid;
	late String typeName;

	HomeCommunityDetailObj();

	factory HomeCommunityDetailObj.fromJson(Map<String, dynamic> json) => $HomeCommunityDetailObjFromJson(json);

	Map<String, dynamic> toJson() => $HomeCommunityDetailObjToJson(this);

	HomeCommunityDetailObj copyWith({int? id, String? title, String? contacts, String? contactWay, List<String>? showImages, String? describe, int? views, String? publishTime, String? createTime, String? updateTime, int? cid, String? typeName}) {
		return HomeCommunityDetailObj()
			..id= id ?? this.id
			..title= title ?? this.title
			..contacts= contacts ?? this.contacts
			..contactWay= contactWay ?? this.contactWay
			..showImages= showImages ?? this.showImages
			..describe= describe ?? this.describe
			..views= views ?? this.views
			..publishTime= publishTime ?? this.publishTime
			..createTime= createTime ?? this.createTime
			..updateTime= updateTime ?? this.updateTime
			..cid= cid ?? this.cid
			..typeName= typeName ?? this.typeName;
	}

	@override
	String toString() {
		return jsonEncode(this);
	}
}